package com.baizhi.dao;

import com.baizhi.entity.Emp;
import com.baizhi.entity.EmpCondition;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpDAO {

    /**
     * 查询所有的员工信息
     * @return
     */
    Map<String,Object> findAll();

    /**
     * 分页查询
     * @param
     * @param
     * @return   Integer starIndex,Integer rows,String name,Double salary,Integer age
     */
    public List<Emp> findAllPage(Integer starIndex,Integer rows,String name,Integer minAge,Integer maxAge,Double minSalary,Double maxSalary);

    /**
     * 根据条件查询总记录数
     * @return
     */
    public int findCount(String name,Integer minAge,Integer maxAge,Double minSalary,Double maxSalary);

    void save(Emp emp);

    void delete(String id);

    Emp findOne(String id);

    void update(Emp emp);
}
